package com.zhongfl.crm.enums.boss;

import lombok.Getter;

/**
 * @author 木叶丸
 * @date 2018/6/4
 */
@Getter
public enum NoticeType {

    IN_STORAGE_NOTICE("1", "入库消息提醒"),
    OTHER("0", "其他");

    private String key;
    private String value;

    NoticeType(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static NoticeType getEnumByKey(String key) {
        for (NoticeType item : NoticeType.values()) {
            if (item.getKey().equals(key)) {
                return item;
            }
        }
        return OTHER;
    }
}
